package com.ccit.common.client;

import com.ccit.common.feign.FeignConfiguration;
import com.ccit.model.Course;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Component
@FeignClient(value = "service-course", configuration = FeignConfiguration.class)
public interface CourseClient {
//    @GetMapping("/api/course/getCourseById/{id}")
//    public Course getCourseById(@PathVariable Long id);

    @RequestMapping(value = "/api/course/getCourseById/{id}", method = RequestMethod.GET)
    public Course getCourseById(@PathVariable Long id);

}
